package com.ineatconseil.yougo.dao;

import java.util.Date;
import java.util.List;

import com.ineatconseil.yougo.bo.RequestStatus;
import com.ineatconseil.yougo.bo.User;

public interface UserDao extends GenericDao<User, Long>{
	
	/**
	 * Finds a user using its login
	 * 
	 * @param login
	 * @return The user or null if login couldn't be found 
	 */
	User findByLogin(String login);
	
	/**
	 * Finds users based on their requests
	 * 
	 * @param beginDate Begin date of requests to find
	 * @param endDate End date of requests to find
	 * @param requestStatus List of requests status to find
	 * @return List of users, empty list if none could be found
	 */
	List<User> findByRequests(Date beginDate, Date endDate, List<RequestStatus> requestStatus);
	
}
